import React from "react";
import { Card, Breadcrumb, Form, Input, Radio, Button, Space } from "antd";
import { Link } from "react-router-dom";
import "./index.scss";
import Channel from "../compoment/channel";
export default class ArticlePublish extends React.Component {
  render() {
    return (
      <div>
        <Card
          title={
            <Breadcrumb>
              <Breadcrumb.Item>
                <Link to="/home">首页</Link>
              </Breadcrumb.Item>
              <Breadcrumb.Item>发表文章</Breadcrumb.Item>
            </Breadcrumb>
          }
        >
          <div className="mianm">
            <Form onFinish={this.onFinish}>
              <Form.Item label="标题" name="title">
                <Input
                  style={{
                    width: 400,
                  }}
                />
              </Form.Item>
              <Form.Item label="频道" name="channel_id">
                <Channel />
              </Form.Item>

              <Form.Item label="封面" name="type">
                <Radio.Group onChange={this.changeImageType}>
                  <Radio value={0}>无图</Radio>
                  <Radio value={1}>单图</Radio>
                  <Radio value={3}>三图</Radio>
                  {/* <Radio value={-1}>自动</Radio> */}
                </Radio.Group>
              </Form.Item>
              <Form.Item label="内容" name="content"></Form.Item>
              <Form.Item>
                <Space>
                  <Button size="large" type="primary" htmlType="submit">
                    发布文章
                  </Button>
                  <Button size="large">存入草稿</Button>
                </Space>
              </Form.Item>
            </Form>
          </div>
        </Card>
      </div>
    );
  }
  onFinish = (values) => {
    console.log(values);
  };
}
